﻿<!DOCTYPE html>
<html xmlns:fb="http://ogp.me/ns/fb#">
<head>
	<meta charset="utf-8" />
	<link href="@Url.Content("~/Content/bootstrap.min.css")" rel="stylesheet" type="text/css" />
</head>
	<body>

		<div class="page-header">
			<a href="/"><img src="/Content/logo.bmp" alt="Le chant du canard" /></a>
		</div>

		<div class="navbar">
			<div class="navbar-inner">
				<div class="container">
					<a class="brand" href="/">Le Chant du Canard</a>
						<ul class="nav">
						    @if (!Request.Url.ToString().Contains("Articles") && !Request.Url.ToString().Contains("Categories"))
                            { 
                                <li class="active"><a href="/"><i class="icon-home icon-white"></i> Acceuil</a></li>
							    <li>@Html.ActionLink("Articles", "Index", "Articles")</li>
							    <li>@Html.ActionLink("Categories", "Index", "Categories")</li>                                       
                            }

                            else if (Request.Url.ToString().Contains("Articles"))
                            { 
                                <li><a href="/"><i class="icon-home icon-white"></i> Acceuil</a></li>
							    <li class="active">@Html.ActionLink("Articles", "Index", "Articles")</li>
							    <li>@Html.ActionLink("Categories", "Index", "Categories")</li>   
                            }

                            else if (Request.Url.ToString().Contains("Categories"))
                            { 
                                <li><a href="/"><i class="icon-home icon-white"></i> Acceuil</a></li>
							    <li>@Html.ActionLink("Articles", "Index", "Articles")</li>
							    <li class="active">@Html.ActionLink("Categories", "Index", "Categories")</li>   
                            }                                         
						</ul>
						<ul class="nav pull-right">
                            <form class="navbar-search pull-left" action="/Articles/Search/" method="post">
                                <input name="search-input" type="text" class="search-query" placeholder="Chercher un article">
                            </form> 
                            <li class="divider-vertical"></li>
							@if (Request.IsAuthenticated)
							{
								<li><text>Bienvenue <strong>@User.Identity.Name</strong>!<br />
								@Html.ActionLink("Se déconnecter", "LogOff", "Account")</text></li>
							}
							else
							{
                                <div style="display: none;" id="myModal" class="modal fade">
                                    <div class="modal-header">
                                        <button class="close" data-dismiss="modal">×</button>
                                        <h3>Connexion</h3>
                                    </div>
                                    <div class="modal-body">
                                        @{ var logonModel = new Blog.Models.LogOnModel(); }
                                        @Html.Partial("~/Views/Account/LogOn.cshtml", logonModel)
                                        <a href="#" class="btn btn-danger btn-medium" data-dismiss="modal"><i class="icon-remove icon-white"></i> Fermer</a>
                                    </div>
                                </div>
                                <li><a href="#myModal" data-toggle="modal" id="connection" rel="popover" data-content="Connexion pour l'administrateur uniquement." data-original-title="Se connecter"> Se connecter </a></li>
                            }                        
						</ul>
				</div>
			</div>
		</div>

		<div class="menu">
			<div>
				<div><!-- Marge de gauche --></div>
				<div>
					<div id="aboutPage"><h2>A propos...</h2></div><br />
					@Html.Partial("../Home/About")
				</div>
				<div class="container">
					@RenderBody()
				</div>
				<div><!-- Marge de droite --></div>
			</div>
		</div>

        <div class="page-footer">
			<div id="footer">Mini-projet ASP.NET / Benoît FIGLIUZZI, Nicolas SURREAUX, Axel SCHAEFFER / B2 SUPINFO</div>
		</div>

		<script src="@Url.Content("~/Scripts/social.js")" type="text/javascript"></script>       
		<script src="@Url.Content("~/Scripts/bootstrap-transition.js")" type="text/javascript"></script>
		<script src="@Url.Content("~/Scripts/bootstrap-alert.js")" type="text/javascript"></script>
		<script src="@Url.Content("~/Scripts/bootstrap-collapse.js")" type="text/javascript"></script>
		<script src="@Url.Content("~/Scripts/jquery.js")" type="text/javascript"></script>
		<script src="@Url.Content("~/Scripts/bootstrap-tooltip.js")" type="text/javascript"></script>
		<script src="@Url.Content("~/Scripts/bootstrap-popover.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/Scripts/bootstrap-modal.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/Scripts/bootstrap-validation.js")" type="text/javascript"></script>

		<script type="text/javascript">
			$(function () {
				$("#connection").popover({ placement: 'top' });
			});  
		</script> 

	</body>
</html>
